# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=psi-notify
pkgver=1.2.1
pkgrel=0
pkgdesc="Notifier for system-wide resource pressure using PSI"
url="https://github.com/cdown/psi-notify"
license="MIT"
arch="all"
makedepends="libnotify-dev"
source="https://github.com/cdown/psi-notify/archive/$pkgver/psi-notify-$pkgver.tar.gz"

build() {
	make
}

check() {
	if [ -d /proc/pressure ]; then
		make test
	else
		echo "Skipping tests: no pressure directory found"
	fi
}

package() {
	install -Dm755 psi-notify "$pkgdir"/usr/bin/psi-notify
}

sha512sums="
47fc8d7dff0af1771d6095641b3ee89954aec49b647246c4384b420aeeb46867cfbf800e22ba9351e3f0c039970f8d011897050ddc3a59cef439d8dedbf04f9a  psi-notify-1.2.1.tar.gz
"
